package com.chen.dao;

import com.chen.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

public interface UserMapper extends Mapper<User> {


    @Select({"<script>",
            "select * from  tb_user u ",
            "where  u.email =  #{email}  and u.password = #{password}  and u.state = '1' ",
            "</script>"})
    User queryUser(@Param("email")String email ,@Param("password")String password);



    @Select({"<script>",
            "select u.state from  tb_user u ",
            "where  u.email =  #{email}   ",
            "</script>"})
    String queryStateByEmail(@Param("email")String email);

}
